package com.tcm.prescribe.api.domain.enums;

import java.io.Serializable;

public enum SexEnum implements Serializable {

    /**
     * 待审核
     */
    MALE("1", "男"),

    /**
     * 已完成
     */
    FEMALE("2", "女");

    /**
     * 类型
     */
    private final String status;
    /**
     * 描述
     */
    private final String description;

    SexEnum(String status, String description) {
        this.status = status;
        this.description = description;
    }

    public String getStatus() {
        return this.status;
    }

    public String getDescription() {
        return this.description;
    }

    public static String getValue(String value) {
        SexEnum[] checkStatusEnums = values();
        for (SexEnum checkStatusEnum : checkStatusEnums) {
            if (checkStatusEnum.getStatus().equals(value)) {
                return checkStatusEnum.getStatus();
            }
        }
        return null;
    }

    public static String getDesc(String value) {
        SexEnum[] checkStatusEnums = values();
        for (SexEnum checkStatusEnum : checkStatusEnums) {
            if (checkStatusEnum.getStatus().equals(value)) {
                return checkStatusEnum.getDescription();
            }
        }
        return null;
    }

}
